/*
 * @Author: wangtao
 * @Date: 2021-05-25 09:01:18
 * @LastEditors: 汪滔
 * @LastEditTime: 2021-07-27 11:51:58
 * @Description: file content
 */
package com.yuanduo_app.http;


import com.xujl.fastlib.http.BaseResponse;

import com.yuanduo_app.entity.NearbyOilEntity;
import com.yuanduo_app.entity.NearbyOilLevelEntity;
import com.yuanduo_app.entity.UpdateInfo;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

public interface ApiService {
    String DEV_URL = "http://gateway-dev.cqxmgj.lo:9100/";//dev
    String TEST_URL = "https://api-test.guojutech.net/"; //test
    String UAT_URL = "https://api-uat.guojutech.net/";//uat
    String NORMAL_URL = "https://api.guojutech.net/";//正式

    String DOWNLOAD_URL = "authority-api/file/";
    String VERSION = "v1";

    /**
     * 获取油品列表
     */
    @GET("oil-api/api/" + VERSION + "/oil/findAllOilType")
    Observable<BaseResponse<List<NearbyOilLevelEntity>>> findAllOilType (@QueryMap Map<String, Object> map);

    /**
     * 获取附近油站列表
     */
    @GET("oil-api/api/" + VERSION + "/oil/queStation")
    Observable<BaseResponse<List<NearbyOilEntity>>> queryStationInfo (@QueryMap Map<String, Object> body);

    /**
     * 获取更新信息
     */
    @GET("filereso-api/deployApp/getLastVersion")
    Observable<BaseResponse<UpdateInfo>> queryUpdateInfo (@QueryMap Map<String, Object> body);

    /**
     * 获取地址列表
     */
    @POST("api/data-view/public/address/parent-code")
    @FormUrlEncoded
    Observable<BaseResponse<Object>> queryAddressList (@FieldMap Map<String, Object> map);


}
